import App from './App'
import api from './api'
import constants from '@/common/const/constants.js'
import tool from '@/tool/tool.js';
import '@/common/util/interceptor.js';//引入拦截器

// #ifndef VUE3
import Vue from 'vue'
import store from './store/index.js'

Vue.prototype.$token = ''

Vue.prototype.$api = api
/**
 * 常量
 */
Vue.prototype.$GC = constants
/**
 * vuex
 */
Vue.prototype.$store = store
/**
 * 消息工具
 */
Vue.prototype.$msg = tool.msg
/**
 * 工具类
 */
Vue.prototype.$tool = tool;

Vue.config.productionTip = false
App.mpType = 'app'

// 引入全局 uView 框架
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)

const app = new Vue({
	store,
    ...App
})

app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
import { constant } from 'lodash'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif